<template>
  <section class="main">
    <input id="toggle-all" class="toggle-all" type="checkbox" />
    <label for="toggle-all"></label>
    <ul class="todo-list">
      <TodoItem
        v-for="item in items"
        :key="item.id"
        v-bind="item"
        @delete="$emit('delete', $event)"
        @update="$emit('update', $event)"
      />
    </ul>
  </section>
</template>

<script>
import TodoItem from "./TodoItem.vue";
export default {
  components: {
    TodoItem,
  },

  props: {
    items: Array,
  },
};
</script>
